package spitfire.ksim.data;

import java.util.HashMap;
import java.util.Map;

/**
 * <p>
 * Node snapshot consists of all sensor types in the node and their
 * corresponding {@link KSensorSnapshot}.
 * </p>
 * 
 * @author Adam
 * 
 */
public class KNodeSnapshot {
	private Map<String, KSensorSnapshot> typeSensorSnapshotMap = new HashMap<String, KSensorSnapshot>(7);
	
	public void putSensorSnapshot(String sensorType, KSensorSnapshot dataList) {
		typeSensorSnapshotMap.put(sensorType, dataList);
	}
	
	public KSensorSnapshot getSensorSnapshot(String sensorType) {
		return typeSensorSnapshotMap.get(sensorType);
	}
	
	public Map<String, KSensorSnapshot> getSensorSnapshotMap() {
		return typeSensorSnapshotMap;
	}
	
	@Override
	public String toString() {
		StringBuilder builder = new StringBuilder();
		builder.append("KNodeSnapshot [");
		builder.append(typeSensorSnapshotMap.toString());
		builder.append("]");
		return builder.toString();
	}
}
